﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace shenghua.Common.CustomValueType
{
    [Owned]
    public class TimeLimit
    {
        public DateTime Begin { get; set; }
        public DateTime End { get; set; }

        public bool IsOverdue
        {
            get
            {
                var now = DateTime.Now;
                return now > End;
            }
        }
    }
}
